package com.haiyi.software.app;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class ActivityLaunch extends Activity implements OnClickListener {

	private Button loginButton;

	private Button registerButton;

	@Override
	protected void onCreate(Bundle savedInstanceState) {

		// TODO 自动生成的方法存根
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_launch);
		initComp();
	}

	private void initComp() {

		this.loginButton = (Button) this.findViewById(R.id.btn_launchLogin);

		this.registerButton = (Button) this.findViewById(R.id.btn_launchReg);

		this.loginButton.setOnClickListener(this);
		this.registerButton.setOnClickListener(this);

		// TODO 自动生成的方法存根

	}

	@Override
	public void onClick(View v) {

		// TODO 自动生成的方法存根
		Intent intent;
		switch (v.getId()) {
		case R.id.btn_launchLogin:
			intent = new Intent();
			intent.setClass(this, LoginActivity.class);
			startActivity(intent);
			break;
		case R.id.btn_launchReg:
			intent = new Intent();
			intent.setClass(this, RegisterUsername.class);
			startActivity(intent);
			break;

		}

	}

}
